<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE html>
<html>
<head>
    <title>账户信息</title>
    <%@ include file="/WEB-INF/component/commonCSS.jsp"%>
    <style type="text/css">
        div.group-info {
            margin-top: 10px !important;
            margin-bottom: 0px !important;
        }
        input.innerInput {
            width: 98%;
        }
    </style>
</head>
<body class="skin-blue sidebar-mini fixed skin-blue-light-frame">
    <section class="content-header">
        <h1>银行账户信息查看</h1>
        <ol class="breadcrumb">
            <li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i>首页</a></li>
            <li class="active"><a href="#">账户管理</a></li>
            <li class="active"><a href="toAuditHospAcctList.html">医疗机构账户管理</a></li>
            <li class="active"><a href="#">银行账户信息查看</a></li>
        </ol>
     </section>
     
     
     <section class="content" style="min-height:inherit;">
          <form id="form" class="form-horizontal"  method="post">
            <input type="hidden" name=orgId value="${acctInfo.orgId}" />
            
            <div class="box box-success" style="margin-bottom: 0px;padding-bottom: 10px;">
               <div class="form-group form-group-xs group-info">
                     <label for="inputTextAlter1" class="col-sm-2 text-right">机构编号：</label>
                     <div class="col-sm-4 text-left" >${acctInfo.orgCode}</div>
                     <label for="inputTextAlter2" class="col-sm-2 text-right">机构名称：</label>
                     <div id="orgName" class="col-sm-4 text-left">${acctInfo.orgName}</div>
                </div>
                 
                <div class="form-group form-group-xs group-info">
                     <label for="inputTextAlter2" class="col-sm-2 text-right">账户余额：</label>
                     <div id="outstandAmt" class="col-sm-4 text-left">${acctInfo.outstandAmtStr}</div>
                     <label for="inputTextAlter1" class="col-sm-2 text-right">可用余额：</label>
                     <div id="availableAmt" class="col-sm-4 text-left">${acctInfo.availableAmtStr}</div>
                </div>
                
                <div class="form-group form-group-xs group-info">
                     <label for="inputTextAlter2" class="col-sm-2 text-right">待结算余额：</label>
                     <div id="pendingAmt" class="col-sm-4 text-left">${acctInfo.pendingAmtStr}</div>
                </div> 
                
            </div>
        </form>
     </section>
        
    
    
    <section class="content">
        <div class=" box box-primary">
            <div class="box-body">
                <div class=" form-inline">
        
                   <div class="form-group form-group-xs">
                                             银行账号： <input class="form-control" type="text" id="bankAcctNo" name="bankAcctNo" placeholder="银行账号" />
                   </div>
                   <div class="form-group form-group-xs">
                                            开户人： <input class="form-control" type="text" id="acctHolder"  name="acctHolder" placeholder="开户人" />
                   </div>
                    <div class="form-group form-group-xs">
                                             审核状态： <select class="form-control"  id="auditStatus" name="auditStatus" >
                              <option value="">请选择</option>
                              <option value="0">未审核</option> 
                              <option value="1">通过</option>
                              <option value="2">不通过</option>
                              </select>
                   </div>
                   
                    
                   <button type="button" onclick="gridSerch();" class="btn btn-success btn-sm">查询</button>
                    
                </div>
            </div>
        </div>
        
        <table class="jqgrid" id="gridlist"></table>
        <div id="gridpage"></div>
        
         <div class=" box box-warning bottongroup">
            <a href="toAuditHospAcctList.html" class="btn btn-default btn-sm">返  回</a>
        </div>
        <form action="toAuditHospBankAcct.html" method="post" id="BankForm">
            <input type="hidden" id="bankAcctId" name="bankAcctId">
            <input type="hidden" name=settleAcctId value="${acctInfo.orgId}" />
        </form>
   </section>
    
   <%@ include file="/WEB-INF/component/commonJS.jsp"%>
   <script type="text/javascript">
        $(function() {
            $("#gridlist").jqGrid(
            {   url : "${ctx}/acctInfoCenter/getBankAcctInfoList.html",
                mtype : "POST", 
                datatype : "json",
                postData :{"settleAcctId": "${acctInfo.orgId}"},
                autowidth : true,
                shrinkToFit : false,
                height : 255,
                colNames : [ '银行账号id','账户id','银行账号','开户人 ','开户行 ','开户行行号 ','开户行行名','提交时间 ','提交人 ','审核状态 ','审核时间 ','审核人','审核备注','是否默认','操作 '],
                colModel : [
                            {name : 'bankAcctId',index : 'bankAcctId', hidden : true,width : 100,align : "center"},
                            {name : 'settleAcctId',index : 'settleAcctId',hidden : true , width : 100,align : "center"},
                            {name : 'bankAcctNo',index : 'bankAcctNo',width : 200,align : "center"},    
                            {name : 'acctHolder',index : 'acctHolder',width : 80,align : "center"}, 
                            {name : 'depositBank',index : 'depositBank', hidden:true, width : 120,align : "center"},
                            {name : 'depositBankNo',index : 'depositBankNo',width : 120,align : "center"},
                            {name : 'depositBankName',index : 'depositBankName',width : 200,align : "center",summaryType : 'sum'},
                            {name : 'submitTime',index : 'submitDatetime',width : 140,align : "center"},
                            {name : 'submitUserName',index : 'submitUser',width : 80,align : "center"},
                            {name : 'auditStatusName',index : 'auditStatus',width : 60,align : "center"},
                            {name : 'auditTime',index : 'auditTime',width : 140,align : "center"},
                            {name : 'auditUserName',index : 'auditUser',width : 80,align : "center"}, 
                            {name : 'auditRemark',index : 'auditFemark',width : 80,align : "center"},
                            {name : 'isDefaultAcct',index : 'isDefaultAcct',hidden:true,width : 100,align : "center"},
                            {name : 'order',index : 'order',width : 120,align : "center",
                                formatter:function(val, opts,
                                        rowdata) {
                                    var str="<a href='javaScript:check(\""+rowdata.bankAcctId+"\")'>审核</a>"+"<a href='${ctx }/bankAcctInfoLog/toBankAcctInfoLog.html?bankAcctId=" +rowdata.bankAcctId  + "' >日志查看</a>";
                                    return str
                                }
                            }
                ],
                rowNum : 20,
                rowList : [ 10, 20, 50,100],
                rownumbers : true,
                pager : "#gridpage",
                viewrecords : true,
                caption : "银行账户信息列表",
                jsonReader : {
                    repeatitems : false,
                    id : "ids"
                }
            });
            $("#gridlist").jqGrid('navGrid', '#gridpage', {add : false,edit : false,del : false,search : false,refresh : false});
            $(window).trigger("resize");
        });
        
       function getFoucs(obj, rowId) {
           var text = $.trim($(obj).val());
           if (text != null && text != "") {
               var $checkbox = $("#jqg_gridlist_" + rowId);
               if ($checkbox.is(":not(:checked)")) {
                   $("#gridlist").setSelection(rowId);
               }
           }
       }
       
       //查询
       function gridSerch() {
           var bankAcctNo = $.trim($("#bankAcctNo").val());
           var acctHolder = $.trim($("#acctHolder").val());
           var auditStatus = $.trim($("#auditStatus").val());
           $("#gridlist").jqGrid('setGridParam',{  
               datatype:'json',
               postData:{
                   "bankAcctNo":bankAcctNo,
                   "acctHolder":acctHolder,
                   "auditStatus":auditStatus
               },
               page:1
           }).trigger("reloadGrid"); //重新载入  
       }
       
       //审核
         function check(id) {
           $("#bankAcctId").val(id);
           $("#BankForm").submit();
         }
                 
    </script>
</body>
</html>